package com.greateffect.littlebud.lib.provider;

import java.util.Random;

/**
 * Created by ZengCS on 2016/8/17.
 * E-mail:zengcs@vip.qq.com
 * Add:成都市天府软件园E3
 */
public class AudioProvider {
    private static final String[] PICS = {
            "http://m10.music.126.net/20190815180103/1559896292f989155622e3466ffabbb7/ymusic/030f/0659/0652/4eeba3ec67139de17412186b850c3a70.mp3",
            "http://m10.music.126.net/20190815180330/d327658b8b47f1bfc0ddc45f7b0f54ac/ymusic/12e7/c06a/8363/96f7458345b2962b3309970ca4db0d85.mp3",
    };
    private static Random random = new Random();
    private static int lastInt = -1;

    public static String getAudio() {
        int i = random.nextInt(PICS.length);
        if (i == lastInt) {
            return getAudio();
        }
        lastInt = i;
        return PICS[i];
    }
}
